<?php
//s
function _print_r($v,$left=-1,$ret="MY_tree\n"){
$left+=1;
if (is_array($v) ){
    $ret=$ret."Array\n".str_repeat('  ',$left*4)."(\n";
    foreach ($v as $key=>$val)
    {
        $ret=$ret.str_repeat('  ',$left*4+2)."[$key] => ";
        if (is_array($val)){$ret=_print_r($val,$left,$ret);}
        else {$ret=$ret."$val\n";}
        
    }
    $ret=$ret.str_repeat('  ',$left*4).")\n";
}
else 
{  $ret=$ret.$v; }
   return $ret;
}
?>